home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / elk-2_0.lha / elk-2.0 / examples / xaw / panner < prev    next >
Encoding:
Text File  |  1991-09-26  |  567 b   |  23 lines

  1. ;;; -*-Scheme-*-
  2. ;;;
  3. ;;; Panner widget demo
  4.  
  5. (require 'xwidgets)
  6. (load-widgets shell panner)
  7.  
  8. (define top (application-initialize 'panner))
  9. (set-values! top 'width 150 'height 150)
  10.  
  11. (define panner (create-managed-widget (find-class 'panner) top))
  12.  
  13. (set-values! panner 'background-stipple 'grid2 'allow-off #t
  14.    'canvas-width 150 'canvas-height 150
  15.    'slider-width 60 'slider-height 60)
  16.  
  17. (add-callback panner 'report-callback
  18.   (lambda (w slider)
  19.     (format #t "(~s,~s)~%" (car slider) (cdr slider))))
  20.  
  21. (realize-widget top)
  22. (context-main-loop (widget-context top))
  23.